package net.emsquared.gamedev.entity.playable;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import net.emsquared.gamedev.TestGame;
import net.emsquared.gamedev.entity.AbstractMoveableEntity;
import net.emsquared.gamedev.entity.collectible.Chest;
import net.emsquared.gamedev.entity.collectible.CollectibleItem;
import net.emsquared.gamedev.screens.IScreen;

import java.util.ArrayList;
import java.util.List;

/**
 * Code is not copyrighted...I don't think.
 *
 * @author Matt Meza (mmeza84@gmail.com)
 */

public class Player extends AbstractMoveableEntity
{
   private int chestCount = 0;
   private List<CollectibleItem> inventory = new ArrayList<CollectibleItem>();

   public Player(String aTexturePath, IScreen aScreen, int x, int y)
   {
      super(aTexturePath, aScreen, x, y);
   }

   public Player(String aTexturePath, IScreen aScreen)
   {
      super(aTexturePath, aScreen);
   }

   public int getChestCount()
   {
      return chestCount;
   }

   public void addToInventory(List<CollectibleItem> aCollectibleItems)
   {
      inventory.addAll(aCollectibleItems);
   }

   public void openChest(Chest chest)
   {
      chest.open(this);
      chestCount++;
   }
}
